﻿using Hospital.Model.Pay;
using Hospital.Model.type;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hospital.Model.entity
{
    // 预约挂号
    public class Registration : BaseId
    {
        public DateTime CreateTime { get; set; }  // 挂号日期，不能为空
        public string Status { get; set; }        // 挂号状态，不能为空 0 未果, 1 通过
        public int PatientId { get; set; }        // 外键，关联患者表，不能为空
        public int DepartmentId { get; set; }     // 科室，不能为空
        public string OrderId { get; set; }       // 挂号订单
        [SugarColumn(IsIgnore = true)]
        public Patient Patient { get; set; }       // 通过 PatientId 外键与 Patient 关联
        [SugarColumn(IsIgnore = true)]
        public Department Department { get; set; }
        [SugarColumn(IsIgnore = true)]
        public Order Order { get; set; }
    }
}
